{% extends 'opd/master/layout.html'%}
<meta charset="UTF-8">
  
  {% block css %}
	.color1{background:#f00}

 {% endblock %}
  {% block body %}
	<div id="content">
        <div class="container">
          <div class="crumbs">
            <ul id="breadcrumbs" class="breadcrumb">
              <li>
                <i class="icon-home">
                </i>
                <a href="index.html">
                  运维工单系统
                </a>
              </li>
              <li class="current">
                <a href="pages_calendar.html" title="" class="btn btn-xs btn-primary">
                  同意审批
                </a>
              </li>
            </ul>
            <ul class="crumb-buttons">
              <li>
                <a href="charts.html" title="">
                  <i class="icon-signal">
                  </i>
                  <span>
                    Statistics
                  </span>
                </a>
              </li>
              <li class="dropdown">
                <a href="#" title="" data-toggle="dropdown">
                  <i class="icon-tasks">
                  </i>
                  <span>
                    Users
                    <strong>
                      (+3)
                    </strong>
                  </span>
                  <i class="icon-angle-down left-padding">
                  </i>
                </a>
                <ul class="dropdown-menu pull-right">
                  <li>
                    <a href="form_components.html" title="">
                      <i class="icon-plus">
                      </i>
                      Add new User
                    </a>
                  </li>
                  <li>
                    <a href="http://envato.stammtec.de/themeforest/melon/tables_dynamic.html"
                    title="">
                      <i class="icon-reorder">
                      </i>
                      Overview
                    </a>
                  </li>
                </ul>
              </li>
              <li class="range">
                <a href="#">
                  <i class="icon-calendar">
                  </i>
                  <span>
                  </span>
                  <i class="icon-angle-down">
                  </i>
                </a>
              </li>
            </ul>
          </div>
          
          <div class="row">
            <div class="col-md-12">
              <div class="widget box">
                <div class="widget-header">
                  <h4>
                    <i class="icon-reorder">
                    </i>
						 运维审批反馈
                  </h4>
                </div>
                <div class="widget-content">
                  <form class="form-horizontal row-border" action="/applyagree/" method='POST'>
					<div class="form-group hide">
                      <label class="col-md-2 control-label">
                        ID:
                      </label>
					
						<div class="col-md-2">
							<input type="text" name="applyid"  class="form-control" value="{{applycontent.id}}">
                        </div>
                    </div>
					<div class="form-group hide">
                      <label class="col-md-2 control-label">
                        agreeID:
                      </label>
					
						<div class="col-md-2">
							<input type="text" name="agreeid"  class="form-control" value="3">
                        </div>
                    </div>
					<div class="form-group">
                      <label class="col-md-2 control-label">
                        标题:
                      </label>
					
						<div class="col-md-2">
							<input type="text" name="regular"  class="form-control" value="{{applycontent.title}}" disabled>
                        </div>
                    </div>
                    <div class="form-group">
                      <label class="col-md-2 control-label">
                        描述:
                      </label>
						 <div class="col-md-6">
							<textarea rows="5" cols="0"  name="textarea"  id="filelist" class="form-control text-left" disabled>{{applycontent.Describe}}</textarea>
						</div>
                    </div>
                    <div class="form-group">
                      <label class="col-md-2 control-label">
                        任务类型:
                      </label>
                     	<div class="col-sm-2" >
													
							<select class="form-control" name="tasktype" disabled>
								{% for item in task %}
								<option value="{{item.id}}">{{item.tasktype}}</option>
								{% endfor %}
							
							</select>
						</div>
                    </div>	
					  <div class="form-group">
                      <label class="col-md-2 control-label" >
                        审批人:
                      </label>
                     	<div class="col-sm-2">
													
							<select class="form-control" name="approval" id="approval" disabled>
								{% for item in approval %}
								<option value="{{item.id}}">{{item.nickname}}</option>
								{% endfor %}
							
							</select>
							
						</div>
                    </div>
					<div class="form-group">
                      <label class="col-md-2 control-label">
						执行人:
                      </label>
                     	<div class="col-sm-2" >
													
							<select class="form-control" name="deal" id="deal" disabled>
								{% for item in deal %}
								<option value="{{item.id}}">{{item.nickname}}</option>
								{% endfor %}
							
							</select>
						</div>
                    </div>
					<div class="form-group">
                      <label class="col-md-2 control-label">
                        当前状态:
                      </label>
						 <div class="col-md-10">
							<span class="label label-info" name="applystatus" id="applystatus">{{orderstatus}}</span>
						</div>
                    </div>
					   <div class="form-group">
                      <label class="col-md-2 control-label">
                        期望完成日期:
                      </label>
						<div class="col-md-2">
							<input type="text" name="regular2"  class="form-control" value="{{applycontent.date}}" disabled>
						</div>
                     
                    </div>
					  <div class="form-group">
                      <label class="col-md-2 control-label">
                        审批意见:
                      </label>
						 <div class="col-md-6">
							<textarea rows="5" cols="0"  name="textarea2"  id="filelist2" class="form-control text-left"></textarea>
						</div>
                    </div>
							
					<div class="form-group">
					<label class="col-md-2 control-label">
                        操作:
                      </label>
                   <div class="col-md-2">
                    <input class="btn btn-info" value="同意审批" type="submit">
					<a href="/approval" class="btn btn-warning">取消审批
					</a>
					</div>
					</div>    
					
                  </form>
				  
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
  {% endblock %}
		{% block js %}
		
	<script type="text/javascript">
	
	
    //jeDate.skin('gray');
	/*
	jeDate({
		dateCell:"#indate",//isinitVal:true,
		format:"YYYY-MM",
		isTime:false, //isClear:false,
		minDate:"2015-10-19 00:00:00",
		maxDate:"2016-11-8 00:00:00"
	})
	*/
    jeDate({
		dateCell:"#wocao",
		format:"YYYY年MM月DD日 hh:mm:ss",
		isinitVal:true,
		isTime:true, //isClear:false,
		minDate:"2014-09-19 00:00:00",
		okfun:function(val){alert(val)}
	})
		function check(approvalid,dealid){
			$("#filelist2").val('');
			document.getElementById('yunweigongdan').style.display = 'block';
			$("#yunweigongdan3").addClass("current");
			var appid=$("#approval").val(approvalid);
			$("#approval").find("option[text=approvalid]").attr("selected",true);
			
			var dealid=$("#deal").val(dealid);
			$("#deal").find("option[text=dealid]").attr("selected",true);
			//console.log(wocao);
			/*
			var select=document.getElementById("approval")
			console.log(id);
					$.ajax({
						url:'/getid/',
						data:{nid:id},
						type:'POST',
						success:function(callback){
							callback=jQuery.parseJSON(callback);
							
								alert('删除成功');
								}
		
					});
					
					var newid = '3';  
					for(var i=0; i<select.options.length; i++){  
						if(select.options[i].value == newid){  
							select.options[i].selected = true;  
							break;  
				}  
			  
			}
			*/
		}
		window.onload=check({{approvalid}},{{dealid}});
	   </script>
		 {% endblock %}